package qr.core;

import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Root;

@Root
public class Location {
	
	@Attribute
	private long id;
	
	@Attribute
	private String name;
	
	@Attribute
	private String clue;
	
	@Attribute
	private String information;
	
	public Location() {
		id = 0;
		name = "New Location";
		clue = "Clue";
		information = "Description";
	}
	
	public long getId() {
		return id;
	}

	public String getClue() {
		return clue;
	}

	public void setClue(String clue) {
		this.clue = clue;
	}

	public String getInformation() {
		return information;
	}

	public void setInformation(String information) {
		this.information = information;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String toString() {
		return String.format("%d: %s - %s", id, name, clue);
	}
	
	public boolean equals( Object other ){
		if( other instanceof Location ){
			return id == ((Location) other).id;
		}
		return false;
	}
}
